package jmir.eric.exercici3;
import java.util.Random;

public class Dau {
	
	public static final int NUM_CARES=6;
	public static final int NUM_TIRADES=1000;
	
	public static void main(String[] args) {
		int[] arrayCares = new int[NUM_CARES];
		int[] arrayRandomDau = new int[NUM_TIRADES];
		for (int i=0; i<NUM_TIRADES; i++){
			Random random = new Random();
			int randomNum = random.nextInt((NUM_CARES - 1) + 1) + 1;
			arrayRandomDau[i]=randomNum;
		}
		for (int j=0; j<arrayRandomDau.length;j++){
			int num = arrayRandomDau[j];
			arrayCares[num-1]++;
		}
		for (int k=0; k<arrayCares.length; k++){
			int caradau = k+1;
			System.out.println("El numero " + caradau + " surt " + arrayCares[k]);
		}
	}

}

